'use strict';
import {createElement, Component,render} from 'rax';
import {View,Text,Layout,Button,Touchable,Link} from 'nuke';
import styles from './index.less';
const { MultiRow ,Grid,Col}  = Layout;

class Items extends Component {
    constructor(props) {
      super(props);
    }
    render() {
	   const priceText = this.props.showPrice?
							<Text style={styles.price} >原价￥{this.props.item.price}</Text>
					:"";
        return (
			<Touchable style={styles.gridcell}>
				<Link href="https://h5.m.taobao.com/awp/core/detail.htm?id=554469396218">
					<img src={this.props.item.pic_url} style={styles.img}/>
				</Link>
					<Text style={styles.funTitle}>{this.props.item.name}</Text>
					<Grid style={styles.p}>
						<Text style={styles.y}>￥</Text>
						<Text style={styles.final_price}>{this.props.item.final_price}</Text>
						<Text style={styles.time}>{this.props.notice}</Text>
						{priceText}
					</Grid>
			</Touchable>  
        );
    }
}
export default Items;
